//
//  WildcardGestureRecognizer.m
//

#import "WildcardGestureRecognizer.h"


@implementation WildcardGestureRecognizer
@synthesize touchesMovedCallback;

static bool moved;

-(id) init{
    if (self = [super init])
    {
		moved = NO;
        self.cancelsTouchesInView = NO;
    }
    return self;
}
/*
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {}

- (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event {}

*/
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {
    if (touchesMovedCallback && moved)
        touchesMovedCallback(touches, event);
	moved = NO;
}

- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {
	moved = YES;
}
/*
- (void)reset {}

- (void)ignoreTouch:(UITouch *)touch forEvent:(UIEvent *)event {}
*/
- (BOOL)canBePreventedByGestureRecognizer:(UIGestureRecognizer *)preventingGestureRecognizer
{
    return NO;
}

- (BOOL)canPreventGestureRecognizer:(UIGestureRecognizer *)preventedGestureRecognizer
{
    return NO;
}

@end